﻿Public Class TRIGSOFTCONFI

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        ColorDialog1.ShowDialog()

        If (Button1.Focused) Then
            Descript.Text = "Click to open color dialog."
        End If
    End Sub

    Private Sub LinkLabel1_LinkClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles LinkLabel1.LinkClicked
        Helper.Show()
    End Sub

    Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
        ColorDialog1.ShowDialog()
    End Sub

    Private Sub Button5_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click

        Main.BackgroundImageLayout = ImageLayout.Stretch

        If (Switch1.Checked And ColorDialog1.Color = Drawing.Color.Blue) Then
            Main.BackColor = Drawing.Color.Blue
            Form3.BackColor = Drawing.Color.Blue
            Main.ForeColor = Drawing.Color.White
            CONFIGCOS.BackColor = Drawing.Color.Blue
        ElseIf (Switch1.Checked And ColorDialog1.Color = Drawing.Color.Black) Then
            Main.BackColor = Drawing.Color.Black
            Form3.BackColor = Drawing.Color.Black
            Form3.ForeColor = Drawing.Color.White
            Main.ForeColor = Drawing.Color.White
            CONFIGCOS.BackColor = Drawing.Color.Black
            CONFIGCOS.ForeColor = Drawing.Color.White
        ElseIf (Switch1.Checked And ColorDialog1.Color = Drawing.Color.Red) Then
            Main.BackColor = Drawing.Color.Red
            Main.ForeColor = Drawing.Color.White
            Form3.BackColor = Drawing.Color.Red
            Form3.ForeColor = Drawing.Color.White
            CONFIGCOS.BackColor = Drawing.Color.Red
            CONFIGCOS.ForeColor = Drawing.Color.White
        ElseIf (Switch2.Checked And RadioButton1.Checked) Then
            Main.BackgroundImage = System.Drawing.Image.FromFile("Trigsoft_Backgrounds\FadingGray.JPG")
        ElseIf (Switch2.Checked And RadioButton4.Checked) Then
            Main.BackgroundImage = System.Drawing.Image.FromFile("Trigsoft_Backgrounds\CDs.BMP")
        ElseIf (Switch2.Checked And RadioButton2.Checked) Then
            Main.BackgroundImage = System.Drawing.Image.FromFile("Trigsoft_Backgrounds\Crackers.JPG")
        ElseIf (Switch2.Checked And RadioButton3.Checked) Then
            Main.BackgroundImage = System.Drawing.Image.FromFile("Trigsoft_Backgrounds\SunRise.BMP")
        ElseIf (Switch2.Checked And RadioButton5.Checked) Then
            Main.BackgroundImage = System.Drawing.Image.FromFile("Trigsoft_Backgrounds\Boat.BMP")
        ElseIf (TabControl1.SelectedIndex = 0 And ColorDialog1.Color = Drawing.Color.Black) Then
            Main.GroupBox1.ForeColor = Drawing.Color.Black
            Main.GroupBox2.ForeColor = Drawing.Color.Black
            Main.GroupBox3.ForeColor = Drawing.Color.Black
            Main.InputGroup.ForeColor = Drawing.Color.Black
            Main.CalculationGroup.ForeColor = Drawing.Color.Black
            Main.AreaRadio.ForeColor = Drawing.Color.Black
            Main.SineRadio.ForeColor = Drawing.Color.Black
            Main.CosineRadio.ForeColor = Drawing.Color.Black
            Main.Label8.ForeColor = Drawing.Color.Black
        Else
            'Choose any color to set initial background color to gray.
            Main.BackColor = Drawing.Color.Gray
            Main.ForeColor = Drawing.Color.Cyan
            Form3.BackColor = Drawing.Color.Gray
            Form3.ForeColor = Drawing.Color.Cyan
            CONFIGCOS.BackColor = Drawing.Color.Gray
            CONFIGCOS.ForeColor = Drawing.Color.Cyan
        End If
    End Sub

    Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
        Image.Enabled = False
        ColorDialog1.ShowDialog()
    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        Me.Hide()
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        Me.Hide()
    End Sub

    Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
        Me.Refresh()
    End Sub

    Private Sub RadioButton6_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Switch1.CheckedChanged
        Color.Enabled = True
        Image.Enabled = False


    End Sub

    Private Sub RadioButton7_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Switch2.CheckedChanged
        Image.Enabled = True
        Color.Enabled = False
    End Sub

    Private Sub TRIGSOFTCONFI_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    
    End Sub
End Class